import {
    Base
} from 'base.js';


class ServiceModel extends Base {
    constructor(options) {
        super(options)
        this.$$path = {
            detail: '/service/detail',//服务详情
            service: '/System/service',//商家服务列表
            getPrice: '/service/singlePrice',//单价查询
            getFreight:'/Order/getFreight',
            createOrder:'/Order/create',
            orderList:'/Order/index',
            orderDetail:'/Order/detail',
            payment:'/Order/pay',
            getOrderDetailPrices:'/Order/getOrderDetailPrices',
            info:'/Store/info',
        }
  }
    info(params) {
      return this.postRequest(this.$$path.info, params)
    }
    detail(params) {
        return this.postRequest(this.$$path.detail, params)
    }

    service(params) {
        return this.postRequest(this.$$path.service, params)
    }
    getPrice(params) {
        return this.postRequest(this.$$path.getPrice, params)
    }

    getFreight(params) {
        return this.postRequest(this.$$path.getFreight, params)
    }

    createOrder(params) {
        return this.postRequest(this.$$path.createOrder, params)
    }
    orderList(params){
        return this.postRequest(this.$$path.orderList, params)
    }

    orderDetail(params){
        return this.postRequest(this.$$path.orderDetail, params)
    }
    payment(params){
        return this.postRequest(this.$$path.payment, params)
    }

    getOrderDetailPrices(params){
        return this.postRequest(this.$$path.getOrderDetailPrices, params)
    }
}

export {
    ServiceModel
};